import VueRouter from "vue-router"
//导入子组件
import Member from "./components/tarber/member.vue"
import home from "./components/tarber/hometarber.vue"
import shop from "./components/tarber/shoppingcar.vue"
import search from "./components/tarber/search.vue"
import NewList from "./components/news/newslists.vue"
import newinfo from "./components/news/newsinfo.vue"
import Photo from "./components/photos/photo.vue"
import PhotoInfo from "./components/photos/Photoinfo.vue"
import Goodslist from "./components/goods/goodslist.vue"  
import GoodsInfo from "./components/goods/goodsinfo.vue"

import Goodsdec from "./components/goods/goodsdec.vue"
import Goodssel from "./components/goods/goodssel.vue"


//创建路由对象
var router = new VueRouter({
    routes:[
        { path:"/",redirect:"/home"},
        {path:"/home",component:home},
        {path:"/member",component:Member},
        {path:"/shopcar",component:shop},
        {path:"/search",component:search},
        {path:"/home/nesList",component:NewList},
        {path:"/home/newsinfo/:id",component:newinfo},
        {path:"/home/photo",component: Photo},
        {path:"/home/photoinfo/:id",component:PhotoInfo},
        {path:"/home/goodssell",component:Goodslist},
        {path:"/home/goodsinfo/:id",component:GoodsInfo},
        {path:"/home/goodsdec/:id",component:Goodsdec,name:'goodsdec'},
        {path:"/home/goodssel/:id",component:Goodssel,name:'gosel'}

        
       
        

        
    ],
    linkActiveClass : "mui-active"
})
export default router